//
//  MCNetworkMonitoring.h
//  iMooc
//
//  Created by CoderXSLee on 13/5/7.
//  Copyright © 2013年 李雪松. All rights reserved.
//

#import <Foundation/Foundation.h>

FOUNDATION_EXPORT NSString * const MCNetworkingStatusChangedNotification;

typedef NS_ENUM(NSInteger, MCNetworkStatus) {
    /// 未知网络
    MC_NETWORK_STATUS_Unknown = -1,
    /// 无网络/未连接网络
    MC_NETWORK_STATUS_None = 0,
    /// 手机网
    MC_NETWORK_STATUS_WWAN = 1,
    /// WiFi 网络
    MC_NETWORK_STATUS_WiFi = 2,
    
};

@interface MCNetworkMonitoring : NSObject

/// 网络改变时是否提示，请在 startMonitoring 之前设置. 默认: NO
@property (nonatomic, assign) BOOL changeTip;

/// 网络状态
@property (nonatomic, assign, readonly) MCNetworkStatus networkStatus;
/// 网络状态描述
@property (nonatomic, strong, readonly) NSString *networkStatusString;



/// 启动网络监听
- (void)startMonitoring;
/// 停止网络监听
- (void)stopMonitoring;
/// 注意：同步阻塞模式
- (BOOL)isConnectInternet;


@end


/// 单例
@interface MCNetworkMonitoring (Singleton)
+ (instancetype)sharedInstance;
@end
